package com.sabo.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "service-b",fallbackFactory = BClientFallBack.class)
public interface BClient {

    @GetMapping("/err")
    ResponseEntity<String> err();

    @GetMapping("/ok")
    ResponseEntity<String> ok();

    @GetMapping("/sleep")
    String sleep();

    @GetMapping("/exception")
    Integer exception(@RequestParam Integer a, @RequestParam Integer b);

}
